<div class="form">

<?php 
             
                 if(empty($cod_aluno))
                   $cod_aluno = '';
        $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cad-arq-form',
        'enableAjaxValidation'=>true,
        'htmlOptions'=>array('enctype'=>'multipart/form-data'),
));
?>

	<p class="note">Os campos com <span class="required">*</span> são obrigatórios.</p>

	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->dropDownList($model,'name', cad_doc::loadTableDoc()); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'id_author'); ?>
		<?php echo $form->dropDownList($model,'id_author', cad_aluno::loadTableAlunoArq($cod_aluno)); ?>
		<?php echo $form->error($model,'id_author'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'author'); ?>
		<?php echo $form->textField($model,'author',array("readonly"=>"readonly",'value'=>Yii::app()->user->name)); ?>
		<?php echo $form->error($model,'author'); ?>
	</div>
	<div class="row">
		<?php echo CHtml::activeLabel($model,'link'); ?>
		<?php echo CHtml::activeFileField($model,'link',array('size'=>60,'maxlength'=>200,'allowEmpty'=>true)); ?>
		<?php echo $form->error($model,'link'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Salvar' : 'Salvar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->